package java_learn.java_jinjie.Stream流;

/**
 * 子类
 *
 * @Author: 李浩然
 * @Date: 2021/5/21 11:40 上午
 */
public class Man extends Human {
    @Override
    public void sayHello() {
        System.out.println("Hello,man！");
    }

    public void method(Greetable g) {
        g.greet();
    }

    public void show() {
        method(() -> {
            Human h = new Human();
            h.sayHello();
        });
        method(() -> super.sayHello());
        method(super::sayHello);
    }

    public static void main(String[] args) {
        new Man().show();
    }
}
